package com.woniu.cq.mallorder.service.impl;

import com.woniu.cq.mallorder.domain.Orderitem;
import com.woniu.cq.mallorder.mapper.OrderitemMapper;
import com.woniu.cq.mallorder.service.IOrderitemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author daniel
 * @since 2020-09-19
 */
@Service
public class OrderitemServiceImpl extends ServiceImpl<OrderitemMapper, Orderitem> implements IOrderitemService {
    @Autowired
    private OrderitemMapper orderitemMapper;
    @Override
    public List<Orderitem> getOrderItem(Integer orderId) {
        List<Orderitem> allOrderItem = orderitemMapper.getAllOrderItem(orderId);
        return allOrderItem;
    }

    @Override
    public Orderitem getOneOrderItem(Integer orderItemId) {
        Orderitem orderitem = getById(orderItemId);
        return orderitem;
    }
}
